package com.IC.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;
import java.time.temporal.ChronoUnit;
import java.util.Date;

/**
 * @Author：xiawenze
 * @Package：com.IC.domain
 * @Project：smart2
 * @name：SysRole
 * @Date：2024/7/29 11:26
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class SysRole {
    private Integer id;
    private String name;
    private String remark;
    private Integer deleteFlag;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime mrowTime;

    public void setMrowTime(LocalDateTime mrowTime) {
        this.mrowTime = mrowTime.plus(8, ChronoUnit.HOURS);
    }
}
